package trunk.backend;

public class HTMLTextBox extends HTMLElement {
	private String label, name;
	
	public HTMLTextBox(String l, String n) {
		label = new String(l);
		name = new String(n);
	}
	
	public HTMLTextBox(String n) {
		this("", n);
	}
	
	public String toHTML() {
		String html;
		if (label == null) {
			html = "<input type=\"text\" name=" + name + "\" />\n<br />\n";
		} else {
			html = new String(label);
			html += " <input type=\"text\" name=" + name + "\" />\n<br />\n";
		}
		return html;
	}
}
